const sequelize =  require('sequelize')//引入sequelize orm对象映射模型
const config = require('./config.js')//引入数据库配置文件

const connect = new sequelize(config.database,config.user,config.password,{//创建数据库连接对象
    host:config.host,
    port:config.port,
    dialect:config.databaseType,
    dialectOptions:{
        charset:config.charset
    }
})

module.exports=connect